
/***************************************************************************************
****************************************************************************************
* FILE		: vibration.h
* Description	: 
*			  
* Copyright (c) 2020 by Simlife. All Rights Reserved.
* 
* History:
* Version		Name		Date				Description
   0.1		Alen			2020/05/07		Initial Version
   
****************************************************************************************
****************************************************************************************/

#ifndef _VIBRATION_H_
#define _VIBRATION_H_

#define motor1Port _pa
#define motor1PortAndPin _pa7
#define motor1Pin PIN_7
#define motor1PinReverse PIN_7_REVERSE
#define motor1PortTypeControl _pac
#define motor1PortPullupControl _papu

#define MOTOR1_ON() (motor1PortAndPin = 1)
#define MOTOR1_OFF() (motor1PortAndPin = 0)

#define motor2Port _pb
#define motor2PortAndPin _pb2
#define motor2Pin PIN_2
#define motor2PinReverse PIN_2_REVERSE
#define motor2PortTypeControl _pbc
#define motor2PortPullupControl _pbpu

#define MOTOR2_ON() (motor2PortAndPin = 1)
#define MOTOR2_OFF() (motor2PortAndPin = 0)

#define motor3Port _pa
#define motor3PortAndPin _pa4
#define motor3Pin PIN_4
#define motor3PinReverse PIN_4_REVERSE
#define motor3PortTypeControl _pac
#define motor3PortPullupControl _papu

#define MOTOR3_ON() (motor3PortAndPin = 1)
#define MOTOR3_OFF() (motor3PortAndPin = 0)

#define motor4Port _pd
#define motor4PortAndPin _pd3
#define motor4Pin PIN_3
#define motor4PinReverse PIN_3_REVERSE
#define motor4PortTypeControl _pdc
#define motor4PortPullupControl _pdpu

#define MOTOR4_ON() (motor4PortAndPin = 1)
#define MOTOR4_OFF() (motor4PortAndPin = 0)

#define motor5Port _pb
#define motor5PortAndPin _pb3
#define motor5Pin PIN_3
#define motor5PinReverse PIN_3_REVERSE
#define motor5PortTypeControl _pbc
#define motor5PortPullupControl _pbpu

#define MOTOR5_ON() (motor5PortAndPin = 1)
#define MOTOR5_OFF() (motor5PortAndPin = 0)

#define motor6Port _pb
#define motor6PortAndPin _pb4
#define motor6Pin PIN_4
#define motor6PinReverse PIN_4_REVERSE
#define motor6PortTypeControl _pbc
#define motor6PortPullupControl _pbpu

#define MOTOR6_ON() (motor6PortAndPin = 1)
#define MOTOR6_OFF() (motor6PortAndPin = 0)

#define motor7Port _pd
#define motor7PortAndPin _pd0
#define motor7Pin PIN_0
#define motor7PinReverse PIN_0_REVERSE
#define motor7PortTypeControl _pdc
#define motor7PortPullupControl _pdpu

#define MOTOR7_ON() (motor7PortAndPin = 1)
#define MOTOR7_OFF() (motor7PortAndPin = 0)

#define motor8Port _pa
#define motor8PortAndPin _pa5
#define motor8Pin PIN_5
#define motor8PinReverse PIN_5_REVERSE
#define motor8PortTypeControl _pac
#define motor8PortPullupControl _papu

#define MOTOR8_ON() (motor8PortAndPin = 1)
#define MOTOR8_OFF() (motor8PortAndPin = 0)

#define motor9Port _pb
#define motor9PortAndPin _pb5
#define motor9Pin PIN_5
#define motor9PinReverse PIN_5_REVERSE
#define motor9PortTypeControl _pbc
#define motor9PortPullupControl _pbpu

#define MOTOR9_ON() (motor9PortAndPin = 1)
#define MOTOR9_OFF() (motor9PortAndPin = 0)

#define motor10Port _pb
#define motor10PortAndPin _pb6
#define motor10Pin PIN_6
#define motor10PinReverse PIN_6_REVERSE
#define motor10PortTypeControl _pbc
#define motor10PortPullupControl _pbpu

#define MOTOR10_ON() (motor10PortAndPin = 1)
#define MOTOR10_OFF() (motor10PortAndPin = 0)

#define motor11Port _pa
#define motor11PortAndPin _pa3
#define motor11Pin PIN_3
#define motor11PinReverse PIN_3_REVERSE
#define motor11PortTypeControl _pac
#define motor11PortPullupControl _papu

#define MOTOR11_ON() (motor11PortAndPin = 1)
#define MOTOR11_OFF() (motor11PortAndPin = 0)

#define motor12Port _pa
#define motor12PortAndPin _pa6
#define motor12Pin PIN_6
#define motor12PinReverse PIN_6_REVERSE
#define motor12PortTypeControl _pac
#define motor12PortPullupControl _papu

#define MOTOR12_ON() (motor12PortAndPin = 1)
#define MOTOR12_OFF() (motor12PortAndPin = 0)

extern void initVibrationControlPin(void);
extern void closeVibrationAllPin(void);
extern void vibrationPWMProcess(void);
extern void vibrationProcess(void);

#endif /*_VIBRATION_H_*/
